package com.brp.controller;


import com.brp.service.ICargoService;
import com.brp.vo.CarBuyVo;
import com.brp.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author all
 * @since 2022-03-16
 */
@RestController
@RequestMapping("/cargo")
public class CargoController {

    @Autowired
    private ICargoService cargoService;

    @RequestMapping("/getLike/{name}/{startTime}/{endTime}")
    @ResponseBody
    public ResultVo<CarBuyVo> getLike(@PathVariable("name") String name,@PathVariable("startTime") String startTime,@PathVariable("endTime") String ENDtIME){

        ResultVo<CarBuyVo> allLike = cargoService.getAllLike(name);
        System.out.println(allLike);

        return allLike;
    }

}
